package com.dmitriyp.movie.mapping;

import java.util.Set;

/**
 * Movie bean
 * 
 * @author Dmitriy
 * 
 */
public class Movie {

	private Integer id;
	private String title;
	private Integer releaseYear;
	private Format format;
	private Set<String> stars;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getReleaseYear() {
		return releaseYear;
	}

	public void setReleaseYear(Integer releaseYear) {
		this.releaseYear = releaseYear;
	}

	public Format getFormat() {
		return format;
	}

	public void setFormat(Format format) {
		this.format = format;
	}

	public Set<String> getStars() {
		return stars;
	}

	public void setStars(Set<String> stars) {
		this.stars = stars;
	}

	@Override
	public String toString() {
		return "Movie[title: " + title + "; releaseYear: " + releaseYear
				+ "; format: " + format + "]";
	}

	// @Override
	// public int hashCode() {
	// final int prime = 31;
	// int result = 0;
	// result = prime * result + (title != null ? title.hashCode() : 0);
	// result = prime * result + (format != null ? format.hashCode() : 0);
	// result = prime * result + (releaseYear != null ? releaseYear.hashCode() :
	// 0);
	// result = prime * result + (stars != null ? stars.hashCode() : 0);
	// return result;
	// }
	//
	// @Override
	// public boolean equals(Object obj) {
	// if(obj == this)
	// return true;
	// if(!(obj instanceof Movie))
	// return false;
	// Movie an = (Movie)obj;
	// if(title == null && an.title != null)
	// return false;
	// if(format == null && an.format != null)
	// return false;
	// if(releaseYear == null && an.releaseYear != null)
	// return false;
	// if(stars == null && an.stars != null)
	// return false;
	//
	// return title.equals(an.title) && format.equals(an.format) &&
	// releaseYear.equals(an.releaseYear) && stars.equals(an.stars);
	// }
}
